﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QLBenhVien
{
    public class DBOBenhNhan
    {
        public int id { get; set; }
        public string hoten { get; set; }
        public string diachi { get; set; }
        public DateTime ngaysinh { get; set; }
        public int gioitinh { get; set; }
        public string cmnd { get; set; }
        public string sodienthoai { get; set; }
        public string bhyt { get; set; }
        public DateTime ngaytao { get; set; }

        public bool Save()
        {
            if (id != 0)
            {
                return DAOBenhNhan.Save(this);
            }
            else
            {
                this.ngaytao = DateTime.Now;
                return DAOBenhNhan.Add(this);
            }            
        }
    }
}
